Closed
Bug 565605
Opened 15 years ago
Closed 11 years ago
crash [@ js::ReportStrictModeError] if !ts
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: timeless, Assigned: timeless)
References
(Blocks 1 open bug, )
Details
(Keywords: coverity, crash)
Attachments
(1 file)
876 bytes,
patch
|
jimb
:
review+
|
Details | Diff | Splinter Review |
627 js::ReportStrictModeError(JSContext *cx, TokenStream *ts, JSTreeContext *tc, JSParseNode *pn,
628 uintN errorNumber, ...)
630 JS_ASSERT(ts || tc);
635 if ((tc && tc->flags & TCF_STRICT_MODE_CODE) || (ts && ts->isStrictMode()))
636 flags = JSREPORT_ERROR;
644 bool result = ts->reportCompileErrorNumberVA(pn, flags, errorNumber, ap);
The code seems perfectly happy with only a tc in line 630 and line 635, but at line 644 it changed its mind...
Updated•15 years ago
|
Attachment #445082 -
Flags: review?(brendan) → review?(jim)
Comment 2•14 years ago
|
||
Comment on attachment 445082 [details] [diff] [review]
patch
Seems reasonable. I agree the code is incoherent.
Attachment #445082 -
Flags: review?(jimb) → review+
Comment 3•14 years ago
|
||
There isn't any way to actually get this to crash, though, is there? It seems like all callers do pass a 'ts'.
Comment 4•14 years ago
|
||
Seems like ReportStrictModeError should be js::TokenStream::reportStrictModeError (an instance method).
/be
if all callers pass ts, then there's no way to crash. the code as written with no understanding of callers could crash while it's making its second assertion.
i stand by my bug summary as it's correct. but i've removed the keyword and adjusted the severity.
if someone wants to do more work, i respectfully request they land this and then use their own bug to do further work. they're free to reference the bug number for that additional work here.
Severity: critical → enhancement
Keywords: crash → checkin-needed
Updated•14 years ago
|
Keywords: checkin-needed
Whiteboard: [timeless: need unrotted patch]
Comment 6•12 years ago
|
||
I find no current crashes containing js::ReportStrictModeError
Comment 7•11 years ago
|
||
AFAICT, this patch is no longer relevant because js::ReportStrictModeError is now a member function js::TokenStream::reportStrictModeError.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Keywords: crash
Resolution: --- → WORKSFORME
Whiteboard: [timeless: need unrotted patch]
Updated•7 years ago
|
Blocks: coverity-analysis
You need to log in
before you can comment on or make changes to this bug.
Description
•